package utils;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

public class WebUtils {

    public static String getYearMonthDay() {
        LocalDateTime localDateTime = LocalDateTime.now();
//        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
//        String format = formatter.format(localDateTime);
//        System.out.println("格式化后的日期=" + format);

        int year = localDateTime.getYear();
        int month = localDateTime.getMonthValue();
        int day = localDateTime.getDayOfMonth();
        return year + "/" + month + "/" + day + "/";
    }
}
